package io.kiki.stack.http.feign.apttestgenerator;

import com.google.common.base.CaseFormat;
import com.google.common.base.Converter;

import java.util.List;

public class MethodDefinition {

    private static final Converter<String, String> TO_UPPER_CASE = CaseFormat.LOWER_CAMEL.converterTo(CaseFormat.UPPER_CAMEL);
    private final String name;
    private final String uname;
    private final String returnType;
    private final boolean isVoid;
    private final List<ArgumentDefinition> args;

    public MethodDefinition(String name, String returnType, boolean isVoid, List<ArgumentDefinition> args) {
        super();
        this.name = name;
        this.uname = TO_UPPER_CASE.convert(name);
        this.returnType = returnType;
        this.isVoid = isVoid;
        this.args = args;
    }
}
